package com.deryun.tyl.dao.impl;

import java.util.List;

import org.apache.ibatis.annotations.Update;
import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.beans.factory.annotation.Autowired;

import com.deryun.tyl.bean.ContentMessage;
import com.deryun.tyl.bean.mapper.ContentMessageMapper;
import com.deryun.tyl.bean.tempBean.FriendConnect;
import com.deryun.tyl.bean.tempBean.MyPublish;

public class ContentMessageDaoImpl extends SqlSessionDaoSupport {
	
	@Autowired
	private ContentMessageMapper mapper;
	
	public List<ContentMessage> getAll(String userId){
		return mapper.getAll(userId);
	}
	
	public List<ContentMessage> getAdminAll(){
		return mapper.getAdminAll();
	}
	
	public List<ContentMessage> getAdminAuthCM(){
		return mapper.getAdminAuthCM();
	}
	
	public MyPublish getCount(String userId){
		return mapper.getCount(userId);
	}
	
	public MyPublish getAdminCount(){
		return mapper.getAdminCount();
	}
	
	public MyPublish getAdminAuthCount(){
		return mapper.getAdminAuthCount();
	}
	
	public int addCM(ContentMessage message){
		return mapper.addCM(message);
	}
	
	public ContentMessage getCM(int id){
		return mapper.getCM(id);
	}
	
	public int deleteCM(int id){
		return mapper.deleteCM(id);
	}
	
	public int modifyCM(ContentMessage message){
		return mapper.modifyCM(message);
	}
	
	public int delCMInfo(){
		return mapper.delCMInfo();
	}
	
    public int accessCM(int id){
    	return mapper.accessCM(id);
    }
	
	public int refuseCM(int id){
		return mapper.refuseCM(id);
	}
	
	public List<ContentMessage> searchCM(String plate,String title){
		return mapper.searchCM(plate, title);
	}
	
	public List<ContentMessage> getSixCM(){
		return mapper.getSixCM();
	}
	
	public List<ContentMessage> getCMByPlate(String plate){
		return mapper.getCMByPlate(plate);
	}
	
	public List<FriendConnect> getFC(){
		return mapper.getFC();
	}
	
	public int modifyFC(String title,String address,String position){
		return mapper.modifyFC(title,address,position);
	}
	
	public List<ContentMessage> getProductType(){
		return mapper.getProductType();
	}
	
	public ContentMessage getOnekeyInfo(){
		return mapper.getOnekeyInfo();
	}
	
	public List<ContentMessage> getSixKX(){
		return mapper.getSixKX();
	}
	
	public List<ContentMessage> searchVCM(String startTime,String endtime,String grade,String plate,String title){
		return mapper.searchVCM(startTime, endtime, grade,plate, title);
	}
	
	public List<ContentMessage> getSixRZ(){
		return mapper.getSixRZ();
	}
	
	public List<ContentMessage> searchZFCG(ContentMessage message){
		return mapper.searchZFCG(message);
	}
}
